	<div class="pad_10">
	    <form action="{:U('doUpd')}" method="post" name="form_edit" id="form_edit">
	    	<input type="hidden" name="id" id="id" value="{$cate.id}">
	        <table width="100%" cellpadding="2" cellspacing="1" class="table_form">
	            <tr>
	                <th>父分类:</th>
	                <td>
	                	<select name="pid" style="width:155px;">             
	                		<volist name="pcateList" id="val">
	                			<option value="{$val.id}" <if condition="$val['id'] eq $cate['pid']">selected</if>>{$val.title}</option>
	                		</volist>
	                	</select>
	                </td>
	                <td><div id="pidTip"></div></td>
	            </tr>            
	            <tr>
	                <th>代码:</th>
	                <td><input type="text" name="code" id="code" class="input-text" value="{$cate.code}"></td>
	                <td><div id="codeTip"></div></td>
	            </tr>
	             <tr>
	                <th>名称:</th>
	                <td><input type="text" name="title" id="title" class="input-text" value="{$cate.title}"></td>
	                <td><div id="titleTip" ></div></td>
	            </tr>
	            <tr>
	                <th>排序:</th>
	                <td><input type="text" name="ordlist" id="ordlist" class="input-text" value="{$cate.ordlist}"></td>
	                <td><div id="ordlistTip"></div></td>
	            </tr>
	        </table>
	        <div class="btns">
	        	<input type="submit" name="submit" value="保存" >
	        	<input type="button" name="close" value="关闭" id="dialog_button_close">
	        </div>
	    </form>
	</div>
	<script language="javascript" type="text/javascript" src="__ROOT__/statics/scripts/admin_dialog.js"></script>
	<script type="text/javascript">
		
	$(function(){		
		$.formValidator.initConfig({
			formID:"form_edit",
			wideWord:false,
			submitOnce:true
		});
		
		$("#code").formValidator({
			onShow:"请输入标准的代码",
			onFocus:"食品类A开头，非食品类B开头",
		}).inputValidator({
			min:2,
			max:20,
			onError:"请输入标准的代码"
		});
		
		$("#title").formValidator({
				onShow:"请输入2-10个文字",
				onFocus:"请输入2-10个文字",
				onCorrect:"输入正确"
			}).inputValidator({
				min:2,
				max:20,
				onError:"请输入2-10个文字"
			});
		
		$("#ordlist").formValidator({
			autoModify:true,
			onShow:"请输入0-9999之间的数字",
			onFocus:"请输入0-9999之间的数字",
			onCorrect:"输入正确"
		}).inputValidator({
			min:0,
			max:9999,
			type:"value",
			onError:"请输入0-9999之间的数字"
		});

	})
	
	
	</script>